//https://leetcode.cn/problems/yong-liang-ge-zhan-shi-xian-dui-lie-lcof/
class CQueue {
public:
    CQueue() {

    }

    void appendTail(int value) {
        stpush.push(value);
    }

    int deleteHead() {
        if (stpop.empty())  
        {
            while (!stpush.empty())
            {
                stpop.push(stpush.top());
                stpush.pop();
            }
        }
        if (stpop.empty())
        {
            return -1;
        }
        int ret = stpop.top();
        stpop.pop();
        return ret;

    }
private:
    stack<int> stpush, stpop;  
};